<!DOCTYPE html>
<html>
<head>
  <title>账单</title>
  <include file="Public/head"/>
	<link href="__CSS__/cashier.css" rel="stylesheet">
	<link href="__CSS__/sweetalert.css" rel="stylesheet">
	<link href="__CSS__/dataTables.bootstrap.css" rel="stylesheet">
	<link href="__CSS__/footable.core.css" rel="stylesheet">
  <link href="__CSS__/datepicker3.css" rel="stylesheet">
	<script src="__JS__/footable.all2.min.js"></script>
  <script src="__JS__/bootstrap-datepicker.js"></script>
</head>

<body>
    <div id="wrapper">
<include file="Public/leftmenu"/>
        <div id="page-wrapper" class="gray-bg">
    <include file="Public/top"/>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>收银台</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a>Member</a>
                        </li>
 
                        <li class="active">
                            <strong>记录列表</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
            	<div class="col-lg-12" style="">
            	    <div class="ibox float-e-margins">
            	        <div class="ibox-title clearfix">
						<ul class="nav nav-tabs"><li class="active" style="color:green;"> <a href="#">账单流水</a> </li></ul> 
            	     </div>
<div class="ibox-content"> 
   <nav class="ui-nav clearfix"> 
    <div>
      <img src="__IMG__/btn-001.png" style="margin-top:3px" /><span style="height:20px;line-height:20px;margin:0 10px;">总充值：<span style="color:#e58905">{$statistics.money}</span></span>
      <img src="__IMG__/btn-002.png" style="margin-top:3px" /><span style="height:20px;line-height:20px;margin:0 10px;">总赠送：<span style="color:#69acea">{$statistics.giving}</span></span>
      <img src="__IMG__/btn-003.png" style="margin-top:3px" /><span style="height:20px;line-height:20px;margin:0 10px;">总消费：<span style="color:#dc1f14">{$statistics.xiaofei}</span></span>
    </p>
   </nav> 


   <div class="app__content js-app-main page-cashier">
    <div>
      <!-- 实时交易信息展示区域 --> 
      <div class="cashier-realtime"> 
       <div class="realtime-title-block clearfix"> 
  				<!--<form action="?s=Member/recharge_record" id="search" method="post">
					 <input type="text" style="width:15%;float:left;height:29px;" value="{$mobile}" name="mobile" class="input-sm form-control" placeholder="手机号">		-->																				
						<a href="?s=Member/daochu_record<php>if(!empty($id)) echo '/id/'.$id;if(!empty($_GET['starttime'])) echo '/starttime/'.$_GET['starttime'];if(!empty($_GET['endtime'])) echo '/starttime/'.$_GET['endtime'];</php>" style="float:left;margin-left:20px;height:28px;" class="btn btn-primary js-create-qrcode">导出统计数据</a>
                                    <div id="ymdatepicker" class="input-daterange input-group pull-right" style="width:300px">
                                      <input type="text" value="{$datechose.starttime}" name="starttime" class="input-sm form-control" id="ymstart" placeholder="{$datechose.starttime}" style="border-radius: 7px; height:30px;width:100px;">
                                      <span class="input-group-addon" style="height:30px;line-height:30px;padding:0 3px 0 1px;margin:0;border:none;">至</span>
                                      <input type="text" value="{$datechose.endtime}" name="endtime" class="input-sm form-control" id="ymend" placeholder="{$datechose.endtime}" style="border-radius: 7px; height:30px;width:100px;">
                                      <a onclick="chosedate();"  class="btn btn-primary js-create-qrcode pull-right" style="height:30px;line-height:30px">指定日期</a>
                                    </div>
       </div> 
      </div> 
      <div class="js-real-time-region realtime-list-box loading">
       <div class="widget-list">
        <div class="js-list-filter-region clearfix ui-box" style="position: relative;">
         <div class="widget-list-filter"></div>
        </div> 
        <div class="ui-box"> 
         <table class="ui-table ui-table-list" data-page-size="20" style="padding: 0px;"> 
          <thead class="js-list-header-region tableFloatingHeaderOriginal">
           <tr class="widget-list-header">
            <th>交易单号</th>
            <th>优惠券id</th>
            <th>交易金额</th>
            <th>赠送金额</th>
            <th>获得积分</th>
            <th>交易类型</th>
            <th>支付方式</th>
            <th>交易时间</th>
            <th>备注</th>
            <th>交易余额</th>
           </tr>
          </thead>
          <tbody class="js-list-body-region" id="table-list-body">
		<notempty name="list">
				<volist name="list" id="data">
					   <!-- <tr class="widget-list-item" <eq name="$data['e_type']" value="1">style="color:red"</eq>> -->
            <eq name="data['e_type']" value="1"><tr class="widget-list-item" style="color:red;"><else /><tr class="widget-list-item"></eq>
             <td>{$data.ordernum}</td>
             <td><eq name="data['pid']" value="0">不使用优惠券<else />{$data.pid}</eq></td>
             <td>{$data.money}</td>
             <td>{$data.giving}</td>
             <td>{$data.e_point}</td>
             <td><eq name="data['e_type']" value="1">消费<else />充值</eq></td>
             <td><eq name="data['is_cash']" value="1">现金支付<else />余额支付</eq></td>
             <td>{$data.e_time|time_format}</td>
             <td>{$data.note}</td>
             <td>{$data.balance}</td>

					   </tr>
		   </volist>
   <else/>
		   <tr class="widget-list-item"><td colspan="7">暂无账单记录</td></tr>
				
								
						 </notempty>
          </tbody> 
         </table> 
         <div class="js-list-empty-region"></div> 
        </div> 
        <div class="js-list-footer-region ui-box">
         <div class="widget-list-footer"></div>
        </div> 
       </div>
      </div> 
     </div>
    </div>
	</eq>
   </div> 
  </div>    
            	</div>
				{$page}
            </div>
        </div>
<include file="Public/footer"/>
        </div>
    </div>

 <script>
// /*****删除处理******/
// function delone(dom,id){
//    if(confirm('您确定要删除此项？')){
// 		$.ajax({
// 			url: "s=Member/delsum&id="+id,
// 			type: "POST",
// 			dataType: "json",
// 			data:{id:id},
// 			success: function(res){
// 				if(res.error){
// 					swal({
//         				title: "删除成功",
//         					text: '',
//         					type: "success"
//     					}, function () {
//         					$(dom).parent().parent('tr').remove();
//    						});

// 				}
// 			}
// 		});
//    }
// }
    $(document).ready(function(){
      $('#ymdatepicker input').datepicker({
                keyboardNavigation: false,
                forceParse: false,
        format: "yyyy-mm-dd",
                autoclose: true
            })
    })
    function chosedate(){
      var starttime = $("#ymstart").val();
      var endtime   = $("#ymend").val();
      var url ="?s=Member/bill/id/{$id}";
      if(starttime == '' || starttime == '开始时间'){
        alert("开始时间不可为空");
        return;
      }else{
        url += "/starttime/"+starttime;
      }
      if(endtime != '' && endtime != '结束时间') url += "/endtime/"+endtime
      window.location.href = url;
    }
 </script>
</body>



</html>